interface DataItem {
  id: number;
  title: string;
  description: string;
  optionalField?: string;
  colorHex?: string;
  details?: { primary: string[]; secondary: string[] };
  series?: string;
  statistics?: {
    centroidX: { value: number; unit: string };
    centroidY: { value: number; unit: string };
    centroidZ: { value: number; unit: string };
    frameDuration: { value: number; unit: string };
    kurtosis: { value: number; unit: string };
    max: { value: number; unit: string };
    maxSlice: { value: number; unit: string };
    mean: { value: number; unit: string };
    median: { value: number; unit: string };
    min: { value: number; unit: string };
    regions: { value: number; unit: string };
    skewness: { value: number; unit: string };
    sphereDiameter: { value: number; unit: string };
    standardDeviation: { value: number; unit: string };
    suvPeak: { value: number; unit: string };
    total: { value: number; unit: string };
    glycolysis: { value: number; unit: string };
    volume: { value: number; unit: string };
    voxelCount: { value: number; unit: string };
  };
}

interface ListGroup {
  type: string;
  items: DataItem[];
}

const actionOptionsMap: { [key: string]: string[] } = {
  Measurement: ['Rename', 'Lock', 'Delete'],
  Segmentation: ['Rename', 'Lock', 'Export', 'Delete'],
  'ROI Tools': ['Rename', 'Lock', 'Delete'],
  'Organ Segmentation': ['Rename', 'Lock', 'Export', 'Delete'],
  // Add more types and their corresponding actions as needed
};

const dataList = [
  {
    type: 'Measurement',
    items: [
      {
        id: 1,
        title: 'Measurement Label',
        description: 'Description for Measurement One.',
        optionalField: 'Optional Info 1',
        details: { primary: ['Data'], secondary: [] },
      },
      {
        id: 2,
        title: 'Measurement Label',
        description: 'Description for Measurement Two.',
        details: { primary: ['Data'], secondary: [] },
      },
    ],
  },
  {
    type: 'Segmentation',
    items: [
      {
        id: 3,
        title: 'Segmentation One',
        colorHex: '#FF5733',
        description: 'Description for Segmentation One.',
      },
      {
        id: 4,
        title: 'Segmentation Two',
        colorHex: '#FF5733',
        description: 'Description for Segmentation Two.',
      },
      {
        id: 5,
        title: 'Segmentation Three',
        colorHex: '#FF5733',
        description: 'Description for Segmentation Three.',
      },
    ],
  },
  {
    type: 'ROI Tools',
    items: [
      {
        id: 6,
        title: 'Linear',
        description: 'Description for Linear.',
        details: { primary: ['49.2 mm'], secondary: ['S2 I:1'] },
      },
      {
        id: 7,
        title: 'Bidirectional',
        description: 'Description for Bidirectional.',
        details: { primary: ['L: 34.5 mm', 'W: 23.0 mm'], secondary: ['S:2 I:2'] },
      },
      {
        id: 8,
        title: 'Ellipse',
        description: 'Description for Ellipse.',
        details: { primary: ['2641 mm²', 'Max: 1087 HU'], secondary: ['S:2 I:4'] },
      },
      {
        id: 9,
        title: 'Rectangle',
        description: 'Description for Rectangle.',
        details: { primary: ['1426 mm²', 'Max: 718 HU'], secondary: ['S:2 I:5'] },
      },
      {
        id: 10,
        title: 'Circle',
        description: 'Description for Circle.',
        details: { primary: ['7339 mm²', 'Max: 871 HU'], secondary: ['S:2 I:6'] },
      },
      {
        id: 11,
        title: 'Freehand ROI',
        description: 'Description for Freehand ROI.',
        details: {
          primary: ['Mean: 215 HU', 'Max: 947 HU', 'Area: 839 mm²'],
          secondary: ['S:2 I:7', 'S:3 I:7'],
        },
      },
      {
        id: 12,
        title: 'Spline Tool',
        description: 'Description for Spline Tool.',
        details: { primary: ['Area: 203 mm²'], secondary: ['S:2 I:8'] },
      },
      {
        id: 13,
        title: 'Livewire Tool',
        description: 'Description for Livewire Tool.',
        details: { primary: ['Area: 203 mm²'], secondary: ['S:2 I:3'] },
      },
      {
        id: 14,
        title: 'Annotation Lorem ipsum dolor sit amet long measurement name continues here',
        description: 'Description for Annotation.',
        details: { primary: ['Area: 203 mm²'], secondary: ['S:2 I:3'] },
      },
    ],
  },
  {
    type: 'Organ Segmentation',
    items: [
      {
        id: 15,
        title: 'Spleen',
        description: 'Description for Spleen.',
        colorHex: '#6B8E23',
        statistics: {
          centroidX: { value: -3.45, unit: 'cm' },
          centroidY: { value: 4.78, unit: 'cm' },
          centroidZ: { value: 118.32, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.22, unit: '' },
          max: { value: 14.92, unit: 'SUV' },
          maxSlice: { value: 78, unit: '' },
          mean: { value: 7.14, unit: 'SUV' },
          median: { value: 6.85, unit: 'SUV' },
          min: { value: 3.8, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.76, unit: '' },
          sphereDiameter: { value: 7.12, unit: 'cm' },
          standardDeviation: { value: 2.31, unit: 'SUV' },
          suvPeak: { value: 12.95, unit: 'SUV' },
          total: { value: 18245.63, unit: 'SUV' },
          glycolysis: { value: 1245.78, unit: 'SUV ml' },
          volume: { value: 178.34, unit: 'ml' },
          voxelCount: { value: 2834, unit: '' },
        },
      },
      {
        id: 16,
        title: 'Kidney',
        description: 'Description for Kidney.',
        colorHex: '#4682B4',
        statistics: {
          centroidX: { value: 2.18, unit: 'cm' },
          centroidY: { value: 6.32, unit: 'cm' },
          centroidZ: { value: 125.47, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.18, unit: '' },
          max: { value: 16.23, unit: 'SUV' },
          maxSlice: { value: 92, unit: '' },
          mean: { value: 8.05, unit: 'SUV' },
          median: { value: 7.92, unit: 'SUV' },
          min: { value: 4.2, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.91, unit: '' },
          sphereDiameter: { value: 8.45, unit: 'cm' },
          standardDeviation: { value: 2.67, unit: 'SUV' },
          suvPeak: { value: 14.32, unit: 'SUV' },
          total: { value: 22567.89, unit: 'SUV' },
          glycolysis: { value: 1532.45, unit: 'SUV ml' },
          volume: { value: 215.67, unit: 'ml' },
          voxelCount: { value: 3245, unit: '' },
        },
      },
      {
        id: 17,
        title: 'Kidney very long title name lorem ipsum dolor sit amet segmentation',
        description: 'Description for Kidney.',
        colorHex: '#9ACD32',
        statistics: {
          centroidX: { value: -2.34, unit: 'cm' },
          centroidY: { value: 5.87, unit: 'cm' },
          centroidZ: { value: 124.65, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.25, unit: '' },
          max: { value: 15.45, unit: 'SUV' },
          maxSlice: { value: 88, unit: '' },
          mean: { value: 7.82, unit: 'SUV' },
          median: { value: 7.45, unit: 'SUV' },
          min: { value: 4.1, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.85, unit: '' },
          sphereDiameter: { value: 7.95, unit: 'cm' },
          standardDeviation: { value: 2.54, unit: 'SUV' },
          suvPeak: { value: 13.78, unit: 'SUV' },
          total: { value: 21345.67, unit: 'SUV' },
          glycolysis: { value: 1423.56, unit: 'SUV ml' },
          volume: { value: 198.45, unit: 'ml' },
          voxelCount: { value: 3012, unit: '' },
        },
      },
      {
        id: 18,
        title: 'Gallbladder',
        description: 'Description for Gallbladder.',
        colorHex: '#20B2AA',
        statistics: {
          centroidX: { value: -1.87, unit: 'cm' },
          centroidY: { value: 4.23, unit: 'cm' },
          centroidZ: { value: 119.78, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.14, unit: '' },
          max: { value: 12.67, unit: 'SUV' },
          maxSlice: { value: 72, unit: '' },
          mean: { value: 6.34, unit: 'SUV' },
          median: { value: 6.12, unit: 'SUV' },
          min: { value: 3.5, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.72, unit: '' },
          sphereDiameter: { value: 5.23, unit: 'cm' },
          standardDeviation: { value: 2.12, unit: 'SUV' },
          suvPeak: { value: 11.45, unit: 'SUV' },
          total: { value: 9876.54, unit: 'SUV' },
          glycolysis: { value: 876.32, unit: 'SUV ml' },
          volume: { value: 98.45, unit: 'ml' },
          voxelCount: { value: 1567, unit: '' },
        },
      },
      {
        id: 19,
        title: 'Esophagus',
        description: 'Description for Esophagus.',
        colorHex: '#DAA520',
        statistics: {
          centroidX: { value: 0.45, unit: 'cm' },
          centroidY: { value: 7.65, unit: 'cm' },
          centroidZ: { value: 132.45, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.12, unit: '' },
          max: { value: 11.34, unit: 'SUV' },
          maxSlice: { value: 65, unit: '' },
          mean: { value: 5.87, unit: 'SUV' },
          median: { value: 5.65, unit: 'SUV' },
          min: { value: 3.2, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.68, unit: '' },
          sphereDiameter: { value: 4.56, unit: 'cm' },
          standardDeviation: { value: 1.98, unit: 'SUV' },
          suvPeak: { value: 10.23, unit: 'SUV' },
          total: { value: 7654.32, unit: 'SUV' },
          glycolysis: { value: 765.43, unit: 'SUV ml' },
          volume: { value: 87.65, unit: 'ml' },
          voxelCount: { value: 1345, unit: '' },
        },
      },
      {
        id: 20,
        title: 'Liver',
        description: 'Description for Liver.',
        colorHex: '#CD5C5C',
        statistics: {
          centroidX: { value: -1.23, unit: 'cm' },
          centroidY: { value: 5.43, unit: 'cm' },
          centroidZ: { value: 121.34, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.19, unit: '' },
          max: { value: 17.56, unit: 'SUV' },
          maxSlice: { value: 95, unit: '' },
          mean: { value: 8.76, unit: 'SUV' },
          median: { value: 8.45, unit: 'SUV' },
          min: { value: 4.5, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.95, unit: '' },
          sphereDiameter: { value: 9.87, unit: 'cm' },
          standardDeviation: { value: 2.87, unit: 'SUV' },
          suvPeak: { value: 15.67, unit: 'SUV' },
          total: { value: 32456.78, unit: 'SUV' },
          glycolysis: { value: 2345.67, unit: 'SUV ml' },
          volume: { value: 345.67, unit: 'ml' },
          voxelCount: { value: 5678, unit: '' },
        },
      },
      {
        id: 21,
        title: 'Stomach',
        description: 'Description for Stomach.',
        colorHex: '#778899',
        statistics: {
          centroidX: { value: -0.87, unit: 'cm' },
          centroidY: { value: 4.98, unit: 'cm' },
          centroidZ: { value: 120.56, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.15, unit: '' },
          max: { value: 13.45, unit: 'SUV' },
          maxSlice: { value: 82, unit: '' },
          mean: { value: 6.78, unit: 'SUV' },
          median: { value: 6.54, unit: 'SUV' },
          min: { value: 3.7, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.79, unit: '' },
          sphereDiameter: { value: 6.78, unit: 'cm' },
          standardDeviation: { value: 2.23, unit: 'SUV' },
          suvPeak: { value: 12.34, unit: 'SUV' },
          total: { value: 15678.9, unit: 'SUV' },
          glycolysis: { value: 1123.45, unit: 'SUV ml' },
          volume: { value: 156.78, unit: 'ml' },
          voxelCount: { value: 2456, unit: '' },
        },
      },
      {
        id: 22,
        title: 'Abdominal aorta',
        description: 'Description for Abdominal Aorta.',
        colorHex: '#B8860B',
        statistics: {
          centroidX: { value: 0.12, unit: 'cm' },
          centroidY: { value: 6.54, unit: 'cm' },
          centroidZ: { value: 126.78, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.11, unit: '' },
          max: { value: 10.23, unit: 'SUV' },
          maxSlice: { value: 68, unit: '' },
          mean: { value: 5.43, unit: 'SUV' },
          median: { value: 5.21, unit: 'SUV' },
          min: { value: 3.1, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.65, unit: '' },
          sphereDiameter: { value: 3.45, unit: 'cm' },
          standardDeviation: { value: 1.87, unit: 'SUV' },
          suvPeak: { value: 9.45, unit: 'SUV' },
          total: { value: 5432.1, unit: 'SUV' },
          glycolysis: { value: 654.32, unit: 'SUV ml' },
          volume: { value: 67.89, unit: 'ml' },
          voxelCount: { value: 1123, unit: '' },
        },
      },
      {
        id: 23,
        title: 'Inferior vena cava',
        description: 'Description for Inferior Vena Cava.',
        colorHex: '#556B2F',
        statistics: {
          centroidX: { value: 0.34, unit: 'cm' },
          centroidY: { value: 6.12, unit: 'cm' },
          centroidZ: { value: 125.43, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.13, unit: '' },
          max: { value: 9.87, unit: 'SUV' },
          maxSlice: { value: 64, unit: '' },
          mean: { value: 5.12, unit: 'SUV' },
          median: { value: 4.98, unit: 'SUV' },
          min: { value: 2.9, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.62, unit: '' },
          sphereDiameter: { value: 3.21, unit: 'cm' },
          standardDeviation: { value: 1.76, unit: 'SUV' },
          suvPeak: { value: 8.98, unit: 'SUV' },
          total: { value: 4567.89, unit: 'SUV' },
          glycolysis: { value: 598.76, unit: 'SUV ml' },
          volume: { value: 59.87, unit: 'ml' },
          voxelCount: { value: 987, unit: '' },
        },
      },
      {
        id: 24,
        title: 'Portal vein',
        description: 'Description for Portal Vein.',
        colorHex: '#8B4513',
        statistics: {
          centroidX: { value: -0.45, unit: 'cm' },
          centroidY: { value: 5.67, unit: 'cm' },
          centroidZ: { value: 123.45, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.14, unit: '' },
          max: { value: 10.56, unit: 'SUV' },
          maxSlice: { value: 71, unit: '' },
          mean: { value: 5.67, unit: 'SUV' },
          median: { value: 5.45, unit: 'SUV' },
          min: { value: 3.2, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.69, unit: '' },
          sphereDiameter: { value: 3.78, unit: 'cm' },
          standardDeviation: { value: 1.92, unit: 'SUV' },
          suvPeak: { value: 9.67, unit: 'SUV' },
          total: { value: 6789.01, unit: 'SUV' },
          glycolysis: { value: 723.45, unit: 'SUV ml' },
          volume: { value: 76.54, unit: 'ml' },
          voxelCount: { value: 1234, unit: '' },
        },
      },
      {
        id: 25,
        title: 'Pancreas',
        description: 'Description for Pancreas.',
        colorHex: '#2F4F4F',
        statistics: {
          centroidX: { value: -1.56, unit: 'cm' },
          centroidY: { value: 5.23, unit: 'cm' },
          centroidZ: { value: 120.87, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.17, unit: '' },
          max: { value: 14.23, unit: 'SUV' },
          maxSlice: { value: 79, unit: '' },
          mean: { value: 7.23, unit: 'SUV' },
          median: { value: 6.98, unit: 'SUV' },
          min: { value: 3.9, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.81, unit: '' },
          sphereDiameter: { value: 6.34, unit: 'cm' },
          standardDeviation: { value: 2.34, unit: 'SUV' },
          suvPeak: { value: 12.67, unit: 'SUV' },
          total: { value: 14567.89, unit: 'SUV' },
          glycolysis: { value: 1087.65, unit: 'SUV ml' },
          volume: { value: 134.56, unit: 'ml' },
          voxelCount: { value: 2134, unit: '' },
        },
      },
      {
        id: 26,
        title: 'Adrenal gland',
        description: 'Description for Adrenal Gland.',
        colorHex: '#708090',
        statistics: {
          centroidX: { value: -2.12, unit: 'cm' },
          centroidY: { value: 5.76, unit: 'cm' },
          centroidZ: { value: 122.34, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.16, unit: '' },
          max: { value: 12.34, unit: 'SUV' },
          maxSlice: { value: 74, unit: '' },
          mean: { value: 6.45, unit: 'SUV' },
          median: { value: 6.23, unit: 'SUV' },
          min: { value: 3.6, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.74, unit: '' },
          sphereDiameter: { value: 5.67, unit: 'cm' },
          standardDeviation: { value: 2.21, unit: 'SUV' },
          suvPeak: { value: 11.23, unit: 'SUV' },
          total: { value: 10987.65, unit: 'SUV' },
          glycolysis: { value: 945.67, unit: 'SUV ml' },
          volume: { value: 112.34, unit: 'ml' },
          voxelCount: { value: 1789, unit: '' },
        },
      },
      {
        id: 27,
        title: 'Adrenal gland',
        description: 'Description for Adrenal Gland.',
        colorHex: '#6A5ACD',
        statistics: {
          centroidX: { value: 2.34, unit: 'cm' },
          centroidY: { value: 5.89, unit: 'cm' },
          centroidZ: { value: 123.56, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.15, unit: '' },
          max: { value: 11.98, unit: 'SUV' },
          maxSlice: { value: 73, unit: '' },
          mean: { value: 6.32, unit: 'SUV' },
          median: { value: 6.12, unit: 'SUV' },
          min: { value: 3.5, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.73, unit: '' },
          sphereDiameter: { value: 5.45, unit: 'cm' },
          standardDeviation: { value: 2.18, unit: 'SUV' },
          suvPeak: { value: 10.87, unit: 'SUV' },
          total: { value: 10456.78, unit: 'SUV' },
          glycolysis: { value: 923.45, unit: 'SUV ml' },
          volume: { value: 109.87, unit: 'ml' },
          voxelCount: { value: 1756, unit: '' },
        },
      },
      {
        id: 28,
        title: 'New Seg Test New Seg Test New Seg Test New Seg Test New Seg Test New Seg Test ',
        description: 'Description for New Seg Test.',
        colorHex: '#4682B4',
        statistics: {
          centroidX: { value: -2.76, unit: 'cm' },
          centroidY: { value: 4.98, unit: 'cm' },
          centroidZ: { value: 121.23, unit: 'cm' },
          frameDuration: { value: 'N/A', unit: 'ms' },
          kurtosis: { value: -0.21, unit: '' },
          max: { value: 15.12, unit: 'SUV' },
          maxSlice: { value: 83, unit: '' },
          mean: { value: 7.45, unit: 'SUV' },
          median: { value: 7.12, unit: 'SUV' },
          min: { value: 4.1, unit: 'SUV' },
          regions: { value: 1, unit: '' },
          skewness: { value: 0.82, unit: '' },
          sphereDiameter: { value: 7.23, unit: 'cm' },
          standardDeviation: { value: 2.45, unit: 'SUV' },
          suvPeak: { value: 13.45, unit: 'SUV' },
          total: { value: 19876.54, unit: 'SUV' },
          glycolysis: { value: 1345.67, unit: 'SUV ml' },
          volume: { value: 187.65, unit: 'ml' },
          voxelCount: { value: 2987, unit: '' },
        },
      },
    ],
  },
  {
    type: 'TMTV1',
    items: [
      {
        id: 29,
        title: 'Segment 1',
        colorHex: '#FF6F61',
        description: 'Description for Segmentation One.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
      {
        id: 30,
        title: 'Segment 2',
        colorHex: '#00CED1',
        description: 'Description for Segmentation Two.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
      {
        id: 31,
        title: 'Segment 3',
        colorHex: '#88B04B',
        description: 'Description for Segmentation One.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
    ],
  },
  {
    type: 'TMTV2',
    items: [
      {
        id: 32,
        title: 'Segment A',
        colorHex: '#FF6F61',
        description: 'Description for Segmentation One.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
      {
        id: 33,
        title: 'Segment B',
        colorHex: '#00CED1',
        description: 'Description for Segmentation Two.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
      {
        id: 34,
        title: 'Segment C',
        colorHex: '#88B04B',
        description: 'Description for Segmentation One.',
        details: { primary: ['SUV Peak: NaN', 'Volume: 21.56mm³'], secondary: [] },
      },
    ],
  },
];

const segmentationData = {
  representation: {
    id: '791aaa59-1df6-60f8-3c28-6d870e6a4585-Labelmap-default',
    segmentationId: '791aaa59-1df6-60f8-3c28-6d870e6a4585',
    label: 'Segmentation',
    active: true,
    type: 'Labelmap',
    visible: true,
    segments: {
      '1': {
        color: [255, 0, 0, 255],
        segmentIndex: 1,
        opacity: 255,
        visible: true,
      },
      '2': {
        color: [0, 255, 0, 255],
        segmentIndex: 2,
        opacity: 255,
        visible: true,
      },
      '3': {
        color: [255, 255, 0, 255],
        segmentIndex: 3,
        opacity: 255,
        visible: true,
      },
      '4': {
        color: [0, 255, 255, 255],
        segmentIndex: 4,
        opacity: 255,
        visible: true,
      },
    },
    viewportId: 'default',
    colorLUTIndex: 0,
    config: {},
  },
  segmentation: {
    segmentationId: '791aaa59-1df6-60f8-3c28-6d870e6a4585',
    label: 'Segmentation',
    cachedStats: {},
    segments: {
      '1': {
        segmentIndex: 1,
        label: 'Liver',
        locked: false,
        cachedStats: {
          category: 'Anatomical Structure',
          type: 'Liver',
          algorithmType: 'SEMIAUTOMATIC',
          algorithmName: 'Amira',
        },
        active: true,
      },
      '2': {
        segmentIndex: 2,
        label: 'Mass',
        locked: false,
        cachedStats: {
          category: 'Morphologically Altered Structure',
          type: 'Mass',
          algorithmType: 'SEMIAUTOMATIC',
          algorithmName: 'Amira',
        },
        active: false,
      },
      '3': {
        segmentIndex: 3,
        label: 'Portal vein',
        locked: false,
        cachedStats: {
          category: 'Anatomical Structure',
          type: 'Portal vein',
          algorithmType: 'SEMIAUTOMATIC',
          algorithmName: 'Amira',
        },
        active: false,
      },
      '4': {
        segmentIndex: 4,
        label: 'Abdominal aorta',
        locked: false,
        cachedStats: {
          category: 'Anatomical Structure',
          type: 'Abdominal aorta',
          algorithmType: 'SEMIAUTOMATIC',
          algorithmName: 'Amira',
        },
        active: false,
      },
    },
    representationData: {
      Labelmap: {
        imageIds: [],
        referencedImageIds: [],
      },
    },
  },
};

const getSegmentationData = ({
  active = false,
  segmentationId = '791aaa59-1df6-60f8-3c28-6d870e6a4585',
}) => {
  return {
    segmentation: {
      ...segmentationData.segmentation,
      active,
      segmentationId,
    },
    representation: {
      ...segmentationData.representation,
      active,
    },
  };
};

const panelSegmentationData = {
  disabled: false,
  data: [
    getSegmentationData({ active: true }),
    getSegmentationData({ active: false, segmentationId: 'babas' }),
  ],
  mode: 'collapsed',
  title: 'Segmentations',
  exportOptions: [
    {
      segmentationId: '791aaa59-1df6-60f8-3c28-6d870e6a4585',
      isExportable: true,
    },
    {
      segmentationId: '791aaa59-1df6-60f8-3c28-6d870e6a4585',
      isExportable: true,
    },
  ],
  disableEditing: false,
  showAddSegment: true,
  renderInactiveSegmentations: true,
};

export { actionOptionsMap, dataList, panelSegmentationData };
export type { DataItem, ListGroup };
